package com.typhoon.spring_jdbctemplate.constant;

public enum StoreReturnAddressEnum {
    STORE_A("store_a","店铺A"),
    STORE_B("store_b","店铺B"),
    ;

    private String code;
    private String desc;

    StoreReturnAddressEnum(String code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public String getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }

    public static StoreReturnAddressEnum of(String code) {
        for(StoreReturnAddressEnum enm : StoreReturnAddressEnum.values()) {
            if(enm.getCode().equals(code)) {
                return enm;
            }
        }
        return null;
    }

}
